<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SA-PCB: plot Namespace Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SA-PCB
   </div>
   <div id="projectbrief">Annealing-basedPCBplacementtool</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">plot Namespace Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a321ca4124dd2907a8abb8ae20978119f"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot.html#a321ca4124dd2907a8abb8ae20978119f">plot_circuit</a> (circuit_name, components, comp2rot, nets, board_dim, figname=None, stats=None, ax=None)</td></tr>
<tr class="separator:a321ca4124dd2907a8abb8ae20978119f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c60d2501cec54913be5a32d5e91b792"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot.html#a3c60d2501cec54913be5a32d5e91b792">pin_pos2</a> (pin_loc, modules, comp2rot)</td></tr>
<tr class="separator:a3c60d2501cec54913be5a32d5e91b792"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ce9d55be487a7cfa6448d7577e0ed9a"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceplot.html#a0ce9d55be487a7cfa6448d7577e0ed9a">pin_pos</a> (pin_loc, modules)</td></tr>
<tr class="separator:a0ce9d55be487a7cfa6448d7577e0ed9a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ab8074dd7080e67f67c6415263a7c5522"><td class="memItemLeft" align="right" valign="top"><a id="ab8074dd7080e67f67c6415263a7c5522"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>circuitname</b> = sys.argv[1]</td></tr>
<tr class="separator:ab8074dd7080e67f67c6415263a7c5522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d00ee35cbd28040d860caf35ad446bf"><td class="memItemLeft" align="right" valign="top"><a id="a4d00ee35cbd28040d860caf35ad446bf"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>plfile</b> = circuitname + '.pl'</td></tr>
<tr class="separator:a4d00ee35cbd28040d860caf35ad446bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b0f3aa5b2ac486612742f0de27c8344"><td class="memItemLeft" align="right" valign="top"><a id="a1b0f3aa5b2ac486612742f0de27c8344"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>nodesfile</b> = circuitname + '.nodes'</td></tr>
<tr class="separator:a1b0f3aa5b2ac486612742f0de27c8344"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939b30a93f87e237460572350197ef7e"><td class="memItemLeft" align="right" valign="top"><a id="a939b30a93f87e237460572350197ef7e"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>netsfile</b> = circuitname + '.nets'</td></tr>
<tr class="separator:a939b30a93f87e237460572350197ef7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b55ca1d467cfd5b9c09f298e6f67baa"><td class="memItemLeft" align="right" valign="top"><a id="a9b55ca1d467cfd5b9c09f298e6f67baa"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>figname</b> = sys.argv[2]</td></tr>
<tr class="separator:a9b55ca1d467cfd5b9c09f298e6f67baa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af9ac5c340bbad25086f56222e0c347f5"><td class="memItemLeft" align="right" valign="top"><a id="af9ac5c340bbad25086f56222e0c347f5"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>bversion</b> = 1</td></tr>
<tr class="separator:af9ac5c340bbad25086f56222e0c347f5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae9274ac371de77e7a6873123b2a6fe27"><td class="memItemLeft" align="right" valign="top"><a id="ae9274ac371de77e7a6873123b2a6fe27"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>boarddimmin</b> = None</td></tr>
<tr class="separator:ae9274ac371de77e7a6873123b2a6fe27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab33f42e4140baa8cbb3f90c87db0375f"><td class="memItemLeft" align="right" valign="top"><a id="ab33f42e4140baa8cbb3f90c87db0375f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>boarddim</b> = None</td></tr>
<tr class="separator:ab33f42e4140baa8cbb3f90c87db0375f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a111f8240cebca4ca871279044485b911"><td class="memItemLeft" align="right" valign="top"><a id="a111f8240cebca4ca871279044485b911"></a>
dictionary&#160;</td><td class="memItemRight" valign="bottom"><b>board_pins</b> = {}</td></tr>
<tr class="separator:a111f8240cebca4ca871279044485b911"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92428e5162a210923e5c951278c63e1e"><td class="memItemLeft" align="right" valign="top"><a id="a92428e5162a210923e5c951278c63e1e"></a>
list&#160;</td><td class="memItemRight" valign="bottom"><b>f</b> = []</td></tr>
<tr class="separator:a92428e5162a210923e5c951278c63e1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1739cb59fbbc5afedb8538be0f9c0d4"><td class="memItemLeft" align="right" valign="top"><a id="ad1739cb59fbbc5afedb8538be0f9c0d4"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>components</b> = <a class="el" href="namespaceload__bookshelf.html#a6206547e6ee76abd5eb80e0167922867">load_bookshelf.read_nodes</a>(nodesfile)</td></tr>
<tr class="separator:ad1739cb59fbbc5afedb8538be0f9c0d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb3cf87bd8279403743675278d9a767a"><td class="memItemLeft" align="right" valign="top"><a id="acb3cf87bd8279403743675278d9a767a"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>comp2rot</b></td></tr>
<tr class="separator:acb3cf87bd8279403743675278d9a767a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8181a530e0b90f4eafeffcd34a70eb98"><td class="memItemLeft" align="right" valign="top"><a id="a8181a530e0b90f4eafeffcd34a70eb98"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>nets</b></td></tr>
<tr class="separator:a8181a530e0b90f4eafeffcd34a70eb98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95cf1393c34dbb7cacd4abf0756e2d71"><td class="memItemLeft" align="right" valign="top"><a id="a95cf1393c34dbb7cacd4abf0756e2d71"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>mod2net</b></td></tr>
<tr class="separator:a95cf1393c34dbb7cacd4abf0756e2d71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93e182761ccd28bdacb93f472ec69493"><td class="memItemLeft" align="right" valign="top"><a id="a93e182761ccd28bdacb93f472ec69493"></a>
list&#160;</td><td class="memItemRight" valign="bottom"><b>board_dim</b> = [[-5,60],[-5,50]]</td></tr>
<tr class="separator:a93e182761ccd28bdacb93f472ec69493"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0baa2249f237ce85db466230c787ea83"><td class="memItemLeft" align="right" valign="top"><a id="a0baa2249f237ce85db466230c787ea83"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>mode</b></td></tr>
<tr class="separator:a0baa2249f237ce85db466230c787ea83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c3294c86b8b6751d73e706f7a1b7275"><td class="memItemLeft" align="right" valign="top"><a id="a2c3294c86b8b6751d73e706f7a1b7275"></a>
string&#160;</td><td class="memItemRight" valign="bottom"><b>ff</b> = './cache/img/' + ff</td></tr>
<tr class="separator:a2c3294c86b8b6751d73e706f7a1b7275"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dc3af850dfb57bb15888c3fb1e510a5"><td class="memItemLeft" align="right" valign="top"><a id="a5dc3af850dfb57bb15888c3fb1e510a5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>image</b> = imageio.imread(ff)</td></tr>
<tr class="separator:a5dc3af850dfb57bb15888c3fb1e510a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><pre class="fragment">///////////////////////////////////////////////////////////////////////////////
// Authors: Chester Holtz, Devon Merrill, James (Ting-Chou) Lin, Connie (Yen-Yi) Wu
//          (respective Ph.D. advisors: Chung-Kuan Cheng, Andrew B. Kahng, Steven Swanson).
//
// BSD 3-Clause License
//
// Copyright (c) 2018, The Regents of the University of California
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
//   list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
//   this list of conditions and the following disclaimer in the documentation
//   and/or other materials provided with the distribution.
//
// * Neither the name of the copyright holder nor the names of its
//   contributors may be used to endorse or promote products derived from
//   this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
///////////////////////////////////////////////////////////////////////////////
</pre> </div><h2 class="groupheader">Function Documentation</h2>
<a id="a0ce9d55be487a7cfa6448d7577e0ed9a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ce9d55be487a7cfa6448d7577e0ed9a">&#9670;&nbsp;</a></span>pin_pos()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def plot.pin_pos </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>pin_loc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>modules</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Convert localized pin positions to position wrt
 global coordinates
:param pin_loc: pin location of the form [pinname, [%x, %y]]
:param modules: list of modules
</pre> 
</div>
</div>
<a id="a3c60d2501cec54913be5a32d5e91b792"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c60d2501cec54913be5a32d5e91b792">&#9670;&nbsp;</a></span>pin_pos2()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def plot.pin_pos2 </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>pin_loc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>modules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>comp2rot</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Convert localized pin positions to position wrt
 global coordinates
:param pin_loc: pin location of the form [pinname, [xoffset, yoffset]]
:param modules: list of modules
</pre> 
</div>
</div>
<a id="a321ca4124dd2907a8abb8ae20978119f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a321ca4124dd2907a8abb8ae20978119f">&#9670;&nbsp;</a></span>plot_circuit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def plot.plot_circuit </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>circuit_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>components</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>comp2rot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>nets</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>board_dim</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>figname</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>stats</em> = <code>None</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>ax</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">board dim: [[xs],[ys]]
</pre> 
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
